package logic

import (
	"context"
	"video-system/model/mysql"

	"video-system/userrpc/internal/svc"
	"video-system/userrpc/userrpc"

	"github.com/zeromicro/go-zero/core/logx"
)

type VideoShowLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewVideoShowLogic(ctx context.Context, svcCtx *svc.ServiceContext) *VideoShowLogic {
	return &VideoShowLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// 视频关联详情
func (l *VideoShowLogic) VideoShow(in *userrpc.VideoShowRequest) (*userrpc.VideoShowResponse, error) {
	// todo: add your logic here and delete this line

	show := mysql.VideoShow(mysql.DB, in.UserId)

	return &userrpc.VideoShowResponse{
		List: show,
	}, nil
}
